#include<iostream>
#include<string>
using namespace std;
int main()
{
	int c = 1;
	char* array = (char*)malloc(sizeof(char) * 1000);
	cin >> array; 
	int len = strlen(array);
	for (int i = 0; i < len; i++)
	{
		int a = array[i];
		while (a / 2 != 0)
		{
			if (a % 2 == 1)
			{
				c++;
			}
			a /= 2;
		}
	}
	cout << c;
	return 0;
}